public class Enumeration01 {
    public static void main(String[] args) {
        System.out.println(Season01.SPRING);
        System.out.println(Season01.SUMMER);
        System.out.println(Season01.AUTUMN);
        System.out.println(Season01.WINNER);
    }
}

//进行自定义类实现枚举：
class Season01 {
    private String name;
    private String description;

    //1.构造器私有化，目的是防止直接new
    //2.本类内部创建对象
    //3.对外暴露对象（通过为对象添加public final static修饰符）
    //4.可以提供get方法，但不能提供get方法
    private Season01(String name, String description) {
        this.name = name;
        this.description = description;
    }

    //枚举对象名使用全部大写
    public final static Season01 SPRING = new Season01("春天", "温暖的");
    public final static Season01 SUMMER = new Season01("夏天", "炎热的");
    public final static Season01 AUTUMN = new Season01("秋天", "凉爽的");
    public final static Season01 WINNER = new Season01("冬天", "寒冷的");

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return "Season01{" +
                "name='" + name + '\'' +
                ", description='" + description + '\'' +
                '}';
    }
}